package com.itheima.d14_extends_constructor;

public class Student {
    private String name;
    private int age;
    private String national;

    public Student(String name, int age, String national) {
        this.name = name;
        this.age = age;
        this.national = national;
    }
    public Student(String name, int age) {

        this(name,age,"提瓦特"); // 默认国籍
    }
    public Student(){}

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getNational() {
        return national;
    }

    public void setNational(String national) {
        this.national = national;
    }
    @Override
    public String toString() {
        return getName() + " " + getAge() + " " + getNational();
    }
}
